package com.genexususa.eo.bing.data.wsSubclasses;

import com.genexususa.eo.bing.CampaignManagementServiceClasses.GenderTarget;
import com.genexususa.eo.bing.CampaignManagementServiceClasses.GenderTargetBid;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

public class GxGenderTarget extends GenderTarget {
    public GxGenderTarget(Element element) {
        NodeList bidsNode = element.getElementsByTagName("GenderTargetBidCollection");
        if (bidsNode.getLength() > 0) {
            NodeList genderTargetBidNode = ((Element)bidsNode.item(0)).getElementsByTagName("GenderTargetBid");
            GenderTargetBid[] genderTargetBids = new GenderTargetBid[genderTargetBidNode.getLength()];
            for (int temp = 0; temp < genderTargetBidNode.getLength(); temp++) {
                genderTargetBids[temp] = new GxGenderTargetBid((Element)genderTargetBidNode.item(temp));
            }
            this.setBids(genderTargetBids);
        }
    }
}
